﻿<!DOCTYPE html>
<html>
<head>
    <meta http-equiv='Content-Type' content='Type=text/html; charset=utf-8'>
    <title>水木雪版活动召集系统</title>
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <script type="text/javascript" src="scripts/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="scripts/jquery.cookie.js"></script>
    <script type="text/javascript" src="scripts/bootstrap-dropdown.js"></script>
    <style type="text/css">
      /* Override some defaults */
      html, body { background-color: #eee; }
      body { padding-top: 40px; /* 40px to make the container go all the way to the bottom of the topbar */ }
      .container > footer p { text-align: center; /* center align it with the container */ }
      .container { width: 820px; /* downsize our container to make the content feel a bit tighter and more cohesive. NOTE: this removes two full columns from the grid, meaning you only go to 14 columns and not 16. */ }

      /* The white background content wrapper */
      .container > .content { background-color: #fff; padding: 20px; margin: 0 -20px; /* negative indent the amount of the padding to maintain the grid system */ border-radius: 0 0 6px 6px; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
      .page-header { background-color: #f5f5f5; padding: 20px 20px 10px; margin: -20px -20px 20px; }
      
      /* Styles you shouldn't keep as they are for displaying this base example only */
      .content .span10, .content .span4 { min-height: 500px; }
      
      /* Give a quick and non-cross-browser friendly divider */
      .content .span4 { margin-left: 0; padding-left: 19px; border-left: 1px solid #eee; }
      .topbar .btn { border: 0; }
      
      #article_list tr { cursor: pointer; }
      #article_list tbody tr:hover { background-color: #DDDDDD; }
    </style>
    <script type="text/javascript">
        var types = { "0": "文章", "1": "自驾活动", "2": "大车活动" };
        var infos = [
            { id: 0, type: 0, content: "" }
        ];

        function checkLogin() {
            var ck = $.cookie("LOGIN");
            if (ck) {
                login(true);
            }
        }

        function login(ischeck) {
            var url = "Login.aspx";
            if (!ischeck) {
                var usr = $("#username").val() + "@" + $("#domain").val();
                var pwd = $("#password").val();

                url += "?username=" + usr + "&password=" + window.escape(pwd);
            }

            $.ajax({
                url: url,
                async: false,
                success: function (data) {
                    var ret = eval("(" + data + ")");
                    if (ret.code == 0) {
                        $("#loginform").hide();
                        $("#userinfo").show();
                        $("#UID").text(ret.username);
                    }
                }
            });
        }

        function quitLogin() {
            $.cookie("LOGIN", null, { path: '/' });
            $.ajax("Quit.aspx");
            $("#loginform").show();
            $("#userinfo").hide();
        }

        $(document).ready(function () {
            checkLogin();
        });
    </script>
</head>
<body>
    <div class="topbar" data-scrollspy="scrollspy">
        <div class="topbar-inner">
            <div class="container">
                <a class="brand">水木雪版</a>
                <ul class="nav">
                </ul>
                <div class="pull-right">
                    <form id="loginform" action="">
                      <input id="username" class="input-small" type="text" placeholder="用户名">
                      <span style="color: white;">@</span>
                      <select id="domain" class="medium">
                          <option value="newsmth.net">newsmth.net</option>
                          <option value="byr.cn">byr.cn</option>
                      </select>
                      <input id="password" class="input-small" type="password" placeholder="密码">
                      <button class="btn" onclick="login();">登陆</button>
                    </form>
    
                    <ul id="userinfo" class="nav secondary-nav" style="display: none;">
                        <li class="dropdown"  data-dropdown="dropdown">
                            <a id="UID" class="dropdown-toggle">ID</a>
                            <ul class="dropdown-menu">
                                <li><a href="#">查看资料</a></li>
                                <!--<li><a href="#">更改密码</a></li>-->
                                <li class="divider"></li>
                                <li><a href="javascript:quitLogin();">退出</a></li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>

    <div class="container">
        <div class="content">
            <div class="page-header">
              <h1>活动列表<small>一起去滑雪吧~~~</small></h1>
            </div>
            <div class="list">
                <table id="article_list">
                    <thead><tr><th>状态</th><th>主题</th><th>活动日期</th><th>发布日期</th></tr></thead>
                    <tbody>
                        <tr><td>召集中</td><td>1.18怀北活动召集</td><td>2012.1.18</td><td>2012.1.15</td></tr>
                        <tr><td>已取消</td><td>1.15怀北活动召集</td><td>2012.1.15</td><td>2012.1.15</td></tr>
                        <tr><td>结束</td><td>1.1怀北活动召集</td><td>2012.1.1</td><td>2011.12.25</td></tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>

    <footer class="footer">
        <div class="container">
            <p class="pull-right">Powered by ttl@newsmth.net</p>
        </div>
    </footer>
</body>
</html>
